<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>学生成绩管理系统</title>
    <link rel="stylesheet" type="text/css" th:href="@{/easyui/css/default.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/easyui/themes/default/easyui.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/easyui/themes/icon.css}" />
    <script type="text/javascript" th:src="@{/easyui/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/easyui/jquery.easyui.min.js}"></script>
    <script type="text/javascript" th:src='@{/easyui/js/outlook2.js}'></script>
    <!-- 添加Google字体 -->
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">

    <!-- 保持原有的菜单配置 -->
    <script type="text/javascript" th:inline="javascript">
        /*<![CDATA[*/
        var usertype = [[${session.usertype}]];
        // ... 保持原有的菜单配置代码不变 ...
        /*]]>*/
    </script>
    <script type="text/javascript" th:inline="javascript">
        /*<![CDATA[*/
        var usertype = [[${session.usertype}]];
        // 管理员的菜单
        if(usertype == "1"){
            var _menus = {"menus":[
                    {"menuid":"2","icon":"","menuname":"学生信息管理",
                        "menus":[
                            {"menuid":"21","menuname":"学生列表","icon":"icon-user-student","url":/*[[@{/student/student_list}]]*/},
                        ]
                    },
                    {"menuid":"4","icon":"","menuname":"班级信息管理",
                        "menus":[
                            {"menuid":"42","menuname":"班级列表","icon":"icon-house","url":/*[[@{/clazz/clazz_list}]]*/}
                        ]
                    },
                    {"menuid":"3","icon":"","menuname":"教师信息管理",
                        "menus":[
                            {"menuid":"31","menuname":"教师列表","icon":"icon-user-teacher","url":/*[[@{/teacher/teacher_list}]]*/},
                        ]
                    },
                    {"menuid":"7","icon":"","menuname":"选课信息管理",
                        "menus":[
                            {"menuid":"71","menuname":"选课列表","icon":"icon-book-open","url":/*[[@{/selectedCourse/selectedCourse_list}]]*/},
                        ]
                    },
                    {"menuid":"9","icon":"","menuname":"请假信息管理",
                        "menus":[
                            {"menuid":"91","menuname":"请假列表","icon":"icon-book-open","url":/*[[@{/leave/leave_list}]]*/},
                        ]
                    },
                    {
                        "menuid": "10", "icon": "", "menuname": "成绩信息管理",
                        "menus": [
                            {
                                "menuid": "101",
                                "menuname": "成绩列表",
                                "icon": "icon-book-open",
                                "url": /*[[@{/score/score_list}]]*/
                            },
                        ]
                    },
                    {"menuid":"5","icon":"","menuname":"系统管理",
                        "menus":[
                            {"menuid":"51","menuname":"修改密码","icon":"icon-set","url":/*[[@{/system/personalView}]]*/},
                        ]
                    }
                ]};
        }
        // 老师的菜单
        if(usertype == "3"){
            var _menus = {"menus":[
                    {"menuid":"2","icon":"","menuname":"学生信息管理",
                        "menus":[
                            {"menuid":"21","menuname":"学生列表","icon":"icon-user-student","url":/*[[@{/student/student_list}]]*/},
                        ]
                    },

                    {"menuid":"3","icon":"","menuname":"教师信息管理",
                        "menus":[
                            {"menuid":"31","menuname":"个人信息","icon":"icon-user-teacher","url":/*[[@{/teacher/teacher_list}]]*/},
                        ]
                    },

                    {"menuid":"7","icon":"","menuname":"选课信息管理",
                        "menus":[
                            {"menuid":"71","menuname":"选课列表","icon":"icon-book-open","url":/*[[@{/selectedCourse/selectedCourse_list}]]*/},
                        ]
                    },

                    {"menuid":"9","icon":"","menuname":"请假信息管理",
                        "menus":[
                            {"menuid":"91","menuname":"请假列表","icon":"icon-book-open","url":/*[[@{/leave/leave_list}]]*/},
                        ]
                    },
                    {
                        "menuid": "10", "icon": "", "menuname": "成绩信息管理",
                        "menus": [
                            {
                                "menuid": "101",
                                "menuname": "成绩列表",
                                "icon": "icon-book-open",
                                "url": /*[[@{/score/score_list}]]*/
                            },
                            ]
                    },
                    {"menuid":"5","icon":"","menuname":"系统管理",
                        "menus":[
                            {"menuid":"51","menuname":"修改密码","icon":"icon-set","url":/*[[@{/system/personalView}]]*/},
                        ]
                    }
                ]};
        }
        // 学生的菜单
        if(usertype == "2"){
            var _menus = {"menus":[
                    {"menuid":"2","icon":"","menuname":"学生信息管理",
                        "menus":[
                            {"menuid":"21","menuname":"学生个人信息","icon":"icon-user-student","url":/*[[@{/student/student_list}]]*/},
                        ]
                    },
                    {"menuid":"7","icon":"","menuname":"选课信息管理",
                        "menus":[
                            {"menuid":"71","menuname":"选课列表","icon":"icon-book-open","url":/*[[@{/selectedCourse/selectedCourse_list}]]*/},
                        ]
                    },
                    {"menuid":"9","icon":"","menuname":"请假信息管理",
                        "menus":[
                            {"menuid":"91","menuname":"请假列表","icon":"icon-book-open","url":/*[[@{/leave/leave_list}]]*/},
                        ]
                    },
                    {
                        "menuid": "10", "icon": "", "menuname": "成绩信息管理",
                        "menus": [
                            {
                                "menuid": "101",
                                "menuname": "成绩列表",
                                "icon": "icon-book-open",
                                "url": /*[[@{/score/score_list}]]*/
                            }
                        ]
                    },
                    {"menuid":"5","icon":"","menuname":"系统管理",
                        "menus":[
                            {"menuid":"51","menuname":"修改密码","icon":"icon-set","url":/*[[@{/system/personalView}]]*/},
                        ]
                    }
                ]};
        }
        /*]]>*/
    </script>
    <style>
        body {
            font-family: 'Noto Sans SC', sans-serif;
            margin: 0;
            padding: 0;
            background: #f0f2f5;
        }

        /* 顶部导航栏 */
        .north-region {
            background: linear-gradient(120deg, #2c3e50 0%, #3498db 100%) !important;
            height: 60px !important;
            line-height: 60px !important;
            padding: 0 30px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .system-title {
            font-size: 22px;
            font-weight: 500;
            color: white;
            letter-spacing: 1px;
        }

        .user-info {
            float: right;
            color: white;
        }

        .user-info span {
            margin-right: 15px;
        }

        .logout-btn {
            padding: 6px 15px;
            background: rgba(255,255,255,0.15);
            border-radius: 4px;
            color: white;
            text-decoration: none;
            transition: all 0.3s;
        }

        .logout-btn:hover {
            background: rgba(255,255,255,0.25);
        }

        /* 左侧菜单 */
        #west {
            background: #fff;
            border-right: 1px solid #eee;
            box-shadow: 2px 0 8px rgba(0,0,0,0.03);
        }

        .easyui-accordion {
            border: none !important;
        }

        .accordion .accordion-header {
            background: #fafafa !important;
            padding: 12px 15px !important;
            font-size: 14px;
            border: none !important;
            color: #333;
        }

        .accordion .accordion-body {
            padding: 10px;
        }

        .nav-item {
            padding: 8px 15px;
            margin: 5px 0;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .nav-item:hover {
            background: #f5f7fa;
            color: #1890ff;
        }

        /* 主内容区域 */
        #mainPanle {
            background: #f5f7fa;
            padding: 15px;
        }

        .easyui-tabs {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 12px rgba(0,0,0,0.05);
        }

        /* 底部区域 */
        .south-region {
            background: #fff !important;
            height: 40px !important;
            line-height: 40px !important;
            text-align: center;
            color: #666;
            border-top: 1px solid #eee;
        }

        /* 图标美化 */
        .icon-user-student,
        .icon-user-teacher,
        .icon-house,
        .icon-book-open,
        .icon-set {
            font-size: 16px;
            margin-right: 8px;
            vertical-align: middle;
        }

        /* 选项卡样式 */
        .tabs-header {
            background: #fff;
            border: none;
        }

        .tabs li {
            margin: 0 3px;
            border-radius: 4px 4px 0 0;
        }

        .tabs li.tabs-selected {
            background: #fff;
            border-color: #ddd;
        }

        /* 保持原有的必要样式 */
        .panel-icon {
            left: 10px;
        }

        .panel-title {
            padding-left: 15px;
            height: 100%;
            font-size: 12px;
        }

        .panel-with-icon {
            padding-left: 25px;
        }
    </style>
</head>

<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
<!-- 顶部区域 -->
<div region="north" split="true" border="false" class="north-region">
    <span class="system-title">学生成绩管理系统</span>
    <div class="user-info">
        <span style="color:white; font-weight:bold;" th:if="${session.usertype == '1'}" th:text="${session.admin.username}"></span>
        <span style="color:white; font-weight:bold;" th:if="${session.usertype == '2'}" th:text="${session.student.username}"></span>
        <span style="color:white; font-weight:bold;" th:if="${session.usertype == '3'}" th:text="${session.teacher.username}"></span>
        您好
        <a th:href="@{/system/logout}" class="logout-btn" id="loginOut">安全退出</a>
    </div>
</div>

<!-- 左侧菜单 -->
<div region="west" hide="true" split="true" title="导航菜单" style="width:220px;" id="west">
    <div id="nav" class="easyui-accordion" fit="true" border="false">
    </div>
</div>

<!-- 主内容区域 -->
<div id="mainPanle" region="center">
    <div id="tabs" class="easyui-tabs" fit="true" border="false" th:include="system/welcome :: welcome">
    </div>
</div>

<!-- 底部区域 -->
<div region="south" split="true" class="south-region">
    <div class="footer">© 2024 学生成绩管理系统 | 技术支持：天专JAVA</div>
</div>
</body>
</html>